<script setup>
  import {
    onLaunch,
    onShow,
    onHide
  } from '@dcloudio/uni-app'

  import {
    storeToRefs
  } from 'pinia'
  import {
    useUserStore
  } from '@/stores/user.js'

  const {
    updateUserInfo
  } = useUserStore()

  onLaunch(() => {
    console.log('App Launch')
    uni.showLoading({
      title: '获取用户数据中。。。'
    })
    updateUserInfo((status) => {
      uni.hideLoading()
      console.log('是否登录：', status)
    })
  })

  onShow(() => {
    console.log('App Show')
  })

  onHide(() => {
    console.log('App Hide')
  })
</script>

<style></style>